<div class="page-content">
    <div class="col-sm-6 pull-right">

        <button class="btn btn-sm btn-primary pull-right" onclick="javascript:window.location.href = '{:url("index")}'">
            返回列表
            <i class="icon-reply icon-only"></i>
        </button>
    </div>
    <div class="page-header">
        <h1>
            {:model('menu')->getParentNname()}
            <small>
                <i class="ace-icon fa fa-angle-double-right"></i>
                {:input('id')?'编辑':'新增'}
            </small>
        </h1>
    </div><!-- /.page-header -->

    <div class="row">
        <div class="col-xs-12">
            <!-- PAGE CONTENT BEGINS -->
            <form class="form-horizontal" role="form" action="{:input('id')?url('edit'):url('add')}" method="post" name="myfrom" >
                {:input('id')?'<input type="hidden" value="'.$info['id'].'" name="id">':''}
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">用户名</label>
                    <div class="col-sm-9">
                        <input type="text" class="col-xs-10 col-sm-5" value="{$info.user_name|default=''}" name="user_name"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">企业</label>
                    <div class="col-sm-9">
                        <select name="com_id" style="width: 300px">
                            <option value="0" />请选择企业</option>
                        {foreach name="company" item="v"}
                            <option value="{$v.id}" {if condition="$v.id eq $info.com_id"}selected{/if}>{$v.name}</option>
                        {/foreach}
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">真实姓名</label>
                    <div class="col-sm-9">
                        <input type="text" class="col-xs-10 col-sm-5" value="{$info.true_name|default=''}" name="true_name"/>
                    </div>
                </div>
                <div class="space-4"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">手机号</label>
                    <div class="col-sm-9">
                        <input type="text" class="col-xs-10 col-sm-5" value="{$info.mobile|default=''}" name="mobile"/>
                    </div>
                </div>
                <div class="space-4"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">角色</label>
                    <div class="col-sm-9">
                        <select name="role_id" style="width: 300px">
                            <option value="0" />请选择角色</option>
                            <option value="1" {if condition="$info.role_id eq 1"}selected{/if}/>管理员</option>
                            <option value="2" {if condition="$info.role_id eq 2"}selected{/if}/>采样员</option>
                            <option value="3" {if condition="$info.role_id eq 3"}selected{/if}/>督察</option>
                        </select>

                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right"> 密码 </label>

                    <div class="col-sm-9">
                        <input type="password" name="password" placeholder="Password" class="col-xs-10 col-sm-5" />
                        <span class="help-inline col-xs-12 col-sm-7">
                            <span class="middle"></span>
                        </span>
                    </div>
                </div>
                <div class="space-4"></div>

                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">联系地址</label>
                    <div class="col-sm-9">
                        <input type="text" class="col-xs-10 col-sm-5" value="{$info.contact_address|default=''}" name="contact_address"/>
                    </div>
                </div>
                <div class="space-4"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">状态</label>
                    <div class="col-sm-9" style="height: 32px;line-height: 36px">
                        <input type="radio"   name="status" value="1" {if condition="$info.status eq 1"}checked{/if}/> 启用&nbsp;&nbsp;
                        <input type="radio"   name="status" value="2" {if condition="$info.status eq 2"}checked{/if}/> 禁用
                    </div>
                </div>
                <div class="space-4"></div>
                <div class="clearfix form-actions">
                    <div class="col-md-offset-3 col-md-9">
                        <button class="btn btn-info" type="button" onclick="myfrom.submit()">
                            <i class="ace-icon fa fa-check bigger-110"></i>
                            提交
                        </button>
                        &nbsp; &nbsp; &nbsp;
                        <button class="btn" type="reset">
                            <i class="ace-icon fa fa-undo bigger-110"></i>
                            重置
                        </button>
                    </div>
                </div>
            </form>
            <!-- PAGE CONTENT ENDS -->
        </div><!-- /.col -->
    </div><!-- /.row -->
</div><!-- /.page-content -->